home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / NextAnswers / 1431_compiling_C++_libraries.rtf < prev    next >
Text File  |  1993-11-08  |  2KB  |  74 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fmodern Courier;\f3\fmodern Ohlfs;}
  2. \paperw13040
  3. \paperh10800
  4. \margl120
  5. \margr120
  6. {\colortbl;\red0\green0\blue0;}
  7. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ulnone\fs28\fc0\cf0 Q:  I obtained the Free Software Foundations libraries described in  ../Objective_C/C++_libraries.rtf, but they won't compile. What do I have to do to get them to compile?\
  8. \
  9. A:  There are a couple of things that you must do in order to compile version 1.37.0 of libg++ on NEXTSTEP.\
  10. \
  11.  
  12. \fi-980\li980 •    First, you must turn off the inclusion of libg++'s malloc routines.  You can do this by setting a compiler flag.  Edit the Makefile and search for 
  13. \fc1\cf1 MALLOC.  Remove the comment # indicator on the line which sets XTRAFLAGS to -DNO_LIBGXX_MALLOC.  It looks like this when you've finished:\
  14.  
  15. \fi0\li0 \
  16.  
  17. \f1\fs24     # Use this to disable placing libg++ version of malloc in libg++.a\
  18.     XTRAFLAGS = -DNO_LIBGXX_MALLOC\
  19.  
  20. \pard\tx620\tx1240\tx1860\tx2480\tx3100\tx3720\tx4340\tx4980\tx5600\tx6220\f3\fs28\fc1\cf1     \
  21.  
  22. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\fc0\cf0     You should also make this change in the Makefile in the 
  23. \b tests
  24. \b0  directory.\
  25. \
  26.  
  27. \fi-980\li980 •     Also, if you are not using gnu make, you should change this line in the same Makefile:\
  28. \
  29.  
  30. \f1\fs24\fi0\li0\fc1\cf1     #PWD := $(shell pwd)\
  31.  
  32. \f0\fs28\fi-980\li980\fc0\cf0 \
  33.     to point to the directory in which the sources live.\
  34.  
  35. \fi0\li0 \
  36.  
  37. \fi-980\li980 •    Next, you must modify the time.h file. There are some conflicts with the time.h file which is shipped with libg++ and the time.h that comes with the NeXT system. Change the first few lines to look like this:\
  38.  
  39. \fi0\li0 \
  40.  
  41. \f1\fs24\fc1\cf1     #ifndef time_h\
  42.     #define time_h 1\
  43.     #ifdef NeXT\
  44.     #define _TIME_H 1\
  45.     #endif\
  46.  
  47. \f0\fs28\fc0\cf0 \
  48.  
  49. \fi-980\li980 •    Modify the Makefile in the 
  50. \b src 
  51. \b0 and the
  52. \b  tests 
  53. \b0 directory. Set GXX to cc++ and set VERBOSITY_FLAGS to -Wall (remove the -v flag. Changing verbosity isn't necessary, but with -v set you will get lots of useless messages.\
  54.  
  55. \fi0\li0 \
  56.  
  57. \fi-980\li980     Like this:\
  58.  
  59. \f1\fs24\fi0\li0\fc1\cf1     GXX = cc++\
  60.     VERBOSITY_FLAGS = -Wall\
  61.  
  62. \f0\fs28\fc0\cf0 \
  63.  
  64. \fi-980\li980 After doing each of these, the GNU libraries compile on NEXTSTEP.\
  65.  
  66. \fi0\li0 \
  67. See also: ../Objective_C/C++_libraries.rtf.\
  68. \
  69. QA702\
  70. \
  71. Valid for 2.0, 3.0\
  72. \
  73.  
  74.